package com.langfeiyes.pattern.prototype;

import java.text.MessageFormat;

//短信工具类
public class SMSUtil {

    //发短信
    public static  void sendSms(SMS sms){
        System.out.println(MessageFormat.format("向手机号为：{0}的用户，发送了短信，内容为：{1}",
                sms.getPhone(), sms.getContent()));
    }

    //获取短信模板，用于拼接短信
    public static String getSmsTemplate(){
        return "亲爱的{0}女士/男士:{1}";
    }

}
